<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>GeoExt.tree.LayerNode &mdash; GeoExt v1.0</title>
    <link rel="stylesheet" href="../../../../_static/geoext.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../../../',
        VERSION:     '1.0',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../../../../_static/favicon.ico"/>
    <link rel="top" title="GeoExt v1.0" href="../../../../index.html" />
    <link rel="up" title="Widgets" href="../../widgets.html" />
    <link rel="next" title="GeoExt.tree.LayerParamLoader" href="LayerParamLoader.html" />
    <link rel="prev" title="GeoExt.tree.LayerLoader" href="LayerLoader.html" />
    
    
    
    
    

  </head>
  <body>
    <div class="header">
        <div class="wrap">
            <h1 id="logo"><a href="../../../../index.html">GeoExt</a></h1>
            <ul id="top-nav">
                <li class="first"><a href="../../../../docs.html">Documentation</a></li>
                <li><a href="../../../../examples.html">Examples</a></li>
                <li><a href="../../../../downloads.html">Download</a></li>
                <li><a href="http://trac.geoext.org/">Development</a></li>
            </ul>
            <div id="searchbox">
                <form class="search" action="../../../../search.html" method="get">
                    <input id="searchbox-query" type="text" name="q" size="25" value="Search &hellip;" tabindex="3" onblur="if(this.value=='') this.value='Search &hellip;';" onfocus="if(this.value=='Search &hellip;') this.value='';" />
                    <input id="searchbox-submit" type="image" value="Search" src="../../../../_static/img/search_icon_green.png" />
                    <input type="hidden" name="check_keywords" value="yes" />
                    <input type="hidden" name="area" value="default" />
                </form>
            </div>
        </div>
    </div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li><a href="../../../../index.html">GeoExt</a> &raquo;</li>
          <li><a href="../../../index.html" >API Reference</a> &raquo;</li>
          <li><a href="../../widgets.html" accesskey="U">Widgets</a> &raquo;</li>
        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.tree.LayerNode</span></tt></a></li>
      </ul>
    </div>

      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="../../../../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">GeoExt.tree.LayerNode</span></tt></a><ul>
<li><a class="reference external" href="#config-options">Config Options</a></li>
<li><a class="reference external" href="#public-properties">Public Properties</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="LayerLoader.html"
                                  title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.tree.LayerLoader</span></tt></a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="LayerParamLoader.html"
                                  title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.tree.LayerParamLoader</span></tt></a></p>
        </div>
      </div>


    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="geoext-tree-layernode">
<h1><a title="GeoExt.tree.LayerNode" class="reference internal" href="#GeoExt.tree.LayerNode"><tt class="xref docutils literal"><span class="pre">GeoExt.tree.LayerNode</span></tt></a><a class="headerlink" href="#geoext-tree-layernode" title="Permalink to this headline">¶</a></h1>
<dl class="meta docutils">
<dt>Extends</dt>
<dd><ul class="first last simple">
<li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.tree.TreeNode">Ext.tree.TreeNode</a></li>
</ul>
</dd>
</dl>
<dl class="class">
<dt id="GeoExt.tree.LayerNode">
<em class="property">class </em><tt class="descclassname">GeoExt.tree.</tt><tt class="descname">LayerNode</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#GeoExt.tree.LayerNode" title="Permalink to this definition">¶</a></dt>
<dd><p>A subclass of <tt class="docutils literal"><span class="pre">Ext.tree.TreeNode</span></tt> that is connected to an
<tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt> by setting the node&#8217;s layer property. Checking or
unchecking the checkbox of this node will directly affect the layer and
vice versa. The default iconCls for this node&#8217;s icon is
&#8220;gx-tree-layer-icon&#8221;, unless it has children.</p>
<p>Setting the node&#8217;s layer property to a layer name instead of an object
will also work. As soon as a layer is found, it will be stored as layer
property in the attributes hash.</p>
<p>The node&#8217;s text property defaults to the layer name.</p>
<p>If the node has a checkedGroup attribute configured, it will be
rendered with a radio button instead of the checkbox. The value of
the checkedGroup attribute is a string, identifying the options group
for the node.</p>
<p>To use this node type in a <tt class="docutils literal"><span class="pre">TreePanel</span></tt> config, set <tt class="docutils literal"><span class="pre">nodeType</span></tt> to
&#8220;gx_layer&#8221;.</p>
</dd></dl>

<div class="section" id="config-options">
<h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2>
<p>Configuration properties in addition to
those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.tree.TreeNode">Ext.tree.TreeNode</a>.</p>
<dl class="describe">
<dt>
<tt class="descname">layer</tt></dt>
<dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer</span> <span class="pre">or</span> <span class="pre">String</span></tt>
The layer that this layer node will
be bound to, or the name of the layer (has to match the layer&#8217;s
name property). If a layer name is provided, <tt class="docutils literal"><span class="pre">layerStore</span></tt> also has
to be provided.</dd></dl>

<dl class="describe">
<dt>
<tt class="descname">layerStore</tt></dt>
<dd><a title="GeoExt.data.LayerStore" class="reference external" href="../../data/LayerStore.html#GeoExt.data.LayerStore"><tt class="xref docutils literal"><span class="pre">GeoExt.data.LayerStore</span></tt></a> <tt class="docutils literal"><span class="pre">or</span> <span class="pre">&quot;auto&quot;</span></tt>
The layer store containing the layer that this node represents.  If set
to &#8220;auto&#8221;, the node will query the ComponentManager for a
<a title="GeoExt.MapPanel" class="reference external" href="../MapPanel.html#GeoExt.MapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.MapPanel</span></tt></a>, take the first one it finds and take its layer
store. This property is only required if <tt class="docutils literal"><span class="pre">layer</span></tt> is provided as a
string.</dd></dl>

<dl class="describe">
<dt>
<tt class="descname">loader</tt></dt>
<dd><tt class="docutils literal"><span class="pre">Ext.tree.TreeLoader|Object</span></tt> If provided, subnodes will be added to
this LayerNode. Obviously, only loaders that process an
<tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt> or <a title="GeoExt.data.LayerRecord" class="reference external" href="../../data/LayerRecord.html#GeoExt.data.LayerRecord"><tt class="xref docutils literal"><span class="pre">GeoExt.data.LayerRecord</span></tt></a> (like
<tt class="xref docutils literal"><span class="pre">GeoExt.tree.LayerParamsLoader</span></tt>) will actually generate child
nodes here. If provided as <tt class="docutils literal"><span class="pre">Object</span></tt>, a
<a title="GeoExt.tree.LayerParamLoader" class="reference external" href="LayerParamLoader.html#GeoExt.tree.LayerParamLoader"><tt class="xref docutils literal"><span class="pre">GeoExt.tree.LayerParamLoader</span></tt></a> instance will be created, with
the provided object as configuration.</dd></dl>

</div>
<div class="section" id="public-properties">
<h2>Public Properties<a class="headerlink" href="#public-properties" title="Permalink to this headline">¶</a></h2>
<p>Public properties in addition to those
listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.tree.TreeNode">Ext.tree.TreeNode</a>.</p>
<dl class="attribute">
<dt id="GeoExt.tree.LayerNode.layer">
<tt class="descclassname">LayerNode.</tt><tt class="descname">layer</tt><a class="headerlink" href="#GeoExt.tree.LayerNode.layer" title="Permalink to this definition">¶</a></dt>
<dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt>
The layer this node is bound to.</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
            <li class="right" style="margin-right: 10px">
              <a href="../../../../genindex.html" title="General Index"
                 accesskey="I">index</a></li>
            <li class="right" >
              <a href="../../../../modindex.html" title="Global Module Index"
                 accesskey="M">modules</a> |</li>
            <li class="right" >
              <a href="LayerParamLoader.html" title="GeoExt.tree.LayerParamLoader"
                 accesskey="N">next</a> |</li>
            <li class="right" >
              <a href="LayerLoader.html" title="GeoExt.tree.LayerLoader"
                 accesskey="P">previous</a> |</li>
        <li><a href="../../../../index.html">GeoExt</a> &raquo;</li>
          <li><a href="../../../index.html" >API Reference</a> &raquo;</li>
          <li><a href="../../widgets.html" >Widgets</a> &raquo;</li>
        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.tree.LayerNode</span></tt></a></li>
      </ul>
    </div>

    <div class="footer">
      &copy; Copyright 2009-2010, GeoExt Community.
    </div>
  </body>
</html>